package buildcode.database;

public class TableColumnInfo{
    private String columnName;

    private String camelCaseName;

    private String jdbcTypeName;

    private int jdbcType;
    
    private String note = "";

    private EnumColumnInfo enumColumnInfo;

    private boolean isNull;

    private int strlength = -1;

    private boolean isPrimaryIndex;

    private boolean isUniqueIndex;

    public String getColumnName() {
        return columnName;
    }

    public void setColumnName(String columnName) {
        this.columnName = columnName;
    }

    public String getCamelCaseName() {
        return camelCaseName;
    }

    public void setCamelCaseName(String camelCaseName) {
        this.camelCaseName = camelCaseName;
    }

    public String getJdbcTypeName() {
        return jdbcTypeName;
    }

    public void setJdbcTypeName(String jdbcType) {
        this.jdbcTypeName = jdbcType;
    }

    public String getNote() {
        return note;
    }

    public void setNote(String note) {
        this.note = note;
    }

    public EnumColumnInfo getEnumColumnInfo() {
        return enumColumnInfo;
    }

    public void setEnumColumnInfo(EnumColumnInfo enumColumnInfo) {
        this.enumColumnInfo = enumColumnInfo;
    }

    public String getColumnZhCnName() {
        return enumColumnInfo != null ? enumColumnInfo.getColumnDesc() : note;
    }

    public int getJdbcType() {
        return jdbcType;
    }

    public void setJdbcType(int jdbcType) {
        this.jdbcType = jdbcType;
    }

    public boolean isNull() {
        return isNull;
    }

    public void setNull(boolean isNull) {
        this.isNull = isNull;
    }

    public int getStrlength() {
        return strlength;
    }

    public void setStrlength(int strlength) {
        this.strlength = strlength;
    }

    public boolean isPrimaryIndex() {
        return isPrimaryIndex;
    }

    public void setPrimaryIndex(boolean isPrimaryIndex) {
        this.isPrimaryIndex = isPrimaryIndex;
    }

    public boolean isUniqueIndex() {
        return isUniqueIndex;
    }

    public void setUniqueIndex(boolean isUniqueIndex) {
        this.isUniqueIndex = isUniqueIndex;
    }

}
